﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace QLab.UX.Engine
{
    public class QLabFolder
    {
        public string Name { get; set; }
        public string Path
        {
            get
            {
                return this.ParentFolder == null ? this.ParentProject.HomeFolderPath : this.ParentFolder.Path + this.Name + "\\";
            }
        }
        public QLabFolder ParentFolder { get; set; }
        public QLabProject ParentProject { get; set; }

        public SortedList<string, QLabFunction> QLabFiles { get; set; }
        public SortedList<string, QLabFolder> QLabFolders { get; set; }
        public bool Active { get; set; }

        public QLabFolder(QLabFolder parentFolder, QLabProject parentProject, string name, bool active)
        {
            this.ParentFolder = parentFolder;
            this.ParentProject = parentProject;
            this.Name = name;
            this.QLabFiles = new SortedList<string, QLabFunction>();
            this.QLabFolders = new SortedList<string, QLabFolder>();
            this.Active = active;
        }
    }
}